package com.link.gateway.base.auth.service;

import javax.annotation.Resource;

import com.link.gateway.base.auth.model.Authclient;
import com.link.gateway.base.auth.mybatis.mapper.AuthclientMapper;
import org.springframework.stereotype.Service;

/**
 * Copyright  hande Company. All Rights Reserved.
 *
 * @author  黄龙建
 * @date:   2018-09-18
 * @version 1.0
 */

@Service
public class AuthclientServiceImpl  implements AuthclientService {
    @Resource
    private AuthclientMapper authclientMapper;



    /**
     * @auther HuangLJ
     * @date 2018/9/20 上午10:40
     * @param clientId
     * @return
     * @throws Exception 报错
     * @comments 通过clientId 查询client
     */
    @Override
    public Authclient queryClientByClientId(String clientId) throws  Exception {
        return authclientMapper.queryClientByClientId(clientId);
    }

    @Override
    public Authclient queryClientByUserId(Long userId) {
        return authclientMapper.queryClientByUserId(userId);
    }
}

